#include "pushbutton.h"
#include <stdlib.h>
#include <QDebug>
#include <QRect>
PushButton::PushButton(QWidget* parent):QPushButton(parent)
{

}

void PushButton::enterEvent(QEvent*e)
{
    auto ret = QWidget::geometry();
    qDebug()<<ret.width();
    int x = rand() % ret.width();
    if(x < 200) x = x + 200;
    int y = rand() % ret.height();
    if(y < 200) y += 200;
    this->move(x,y);
}
